Is this the correct way of use Protocol and if it's why mypy fails